/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 * @section DESCRIPTION
 *
 * An abstract interface for runtime images.
 *
 */

#ifndef __TSIN_DISPLAY_GLIMAGE_HPP__
#define __TSIN_DISPLAY_GLIMAGE_HPP__

#include <tsin/display/common.hpp>
#include <tsin/display/Image.hpp>

#ifdef WIN32
#include <windows.h>
#endif
#include <GL/gl.h>

namespace tsin {

        /**
         * @class GLImage
         * @ingroup display
         * @brief Image for OpenGL display.
         *
         * @note Must be used after GLDisplay is initialized.
         *
         */
        class DISPLAY_DLLEXPORT GLImage : public Image {
        public:
                GLImage();
                virtual ~GLImage();

                virtual bool open(const char *path, StandardResolution res);

                virtual int getWidth();
                virtual int getHeight();

                virtual unsigned int getHandle();
                virtual StandardResolution getResolution();

        private:
                int width, height;
                GLuint textureName;
        };
}

#endif /* __TSIN_DISPLAY_GLIMAGE_HPP__ */
